<!DOCTYPE html>
<html>
<head>
<title>新浪明细查询</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<#include "../../../include/resources.html">
<script type="text/javascript">
var dataGrid;
var winWidth =  800;
var winHeight = 280;

var kfVerifyTitle="客服提现审核";
var kfVerifyUrl="/modules/account/cash/accountcash/kfVerifyCashEditPage.html";
var kfVerifyWinParmeters = "'{0}','"+kfVerifyTitle+"',800,500,'"+kfVerifyUrl+"','确定'";
$(function() {
    var search = function (){
        var data = {};
        data.searchName = $("input[name='searchName']").val();
        data.startTime = $("input[name='startTime']").val();
        data.endTime = $("input[name='endTime']").val();
        var options = $('#dataGrid').datagrid('options');
        data.page = options.pageNumber;
        data.rows =options.pageSize;
        $.ajax({
            url : '/modules/tpp/tppMerchantLog/sina/doQueryAccountDetails.html?randomTime=' + (new Date()).getTime(),
            dataType: "json",
            data:data,
            success : function(result){
                var r = result || {};
                if (r.hasError) {
                	$.messager.alert('Warning',r.message);
                } else {
                	$('#dataGrid').datagrid('loadData',{"total" : r.total,"rows" : r.rows});
                }
            }
        });
    }
    
	dataGrid = $('#dataGrid').datagrid({
		fit : true,
		fitColumns : true,
		border : false,
		pagination : true,
		sortOrder : 'desc',
		checkOnSelect : false,
		selectOnCheck : false,
		nowrap : false,
		singleSelect:true,
		pageList: [10, 20,30], 
		columns : [ [ 			
			{ field: 'remark', title: '备注', width: 80},
			{ field: 'time', title: '时间', width: 100},
			{ field: 'changeAmount', title: '变更金额', width: 80},
			{ field: 'accountBalance', title: '账户余额', width: 80 }
		 ] ]
	});

	var dg = $('#dataGrid');
	var opts = dg.datagrid('options');
	var pager = dg.datagrid('getPager');
	pager.pagination({ 
		onSelectPage:function(pageNum, pageSize){
			opts.pageNumber = pageNum;
			opts.pageSize = pageSize;
			pager.pagination('refresh',{
				pageNumber:pageNum,
				pageSize:pageSize
			});
			search();
		}
	});
	
    //重新触发按钮
    $(".sBtn,.reloadIcon").click(function(){
        search();
    })
});
</script>
</head>
<body style="padding:0 20px;" >
	<div class="easyui-layout" data-options="fit : true,border : false">
		<div data-options="region:'north',border:false,collapsible:false" id="searchBox">
        	<div class="sLeft">
	            <form id="searchForm">
	            	<input type="text"  name="searchName" class="sInput" placeholder="输入用户名" autocomplete="off" onkeydown="if(event.keyCode == 13){search();}"/>
                    <input type="text" placeholder="输入开始时间" name="startTime" onFocus="WdatePicker({readOnly:true})" class="searchTime"/>&nbsp;-&nbsp;<input type="text" placeholder="输入结束时间" name="endTime" onFocus="WdatePicker({readOnly:true})" class="searchTime"/>
                    <a href="javascript:void(0);" title="查询" class="sBtn" >查询</a>
	            	<a href="javascript:void(0);" class="reloadIcon" title="刷新" ><i class="iconfont">&#xe603;</i></a>
	            </form>
            </div>
		</div>
		<div data-options="region:'center'" style="margin-top:30px;padding-bottom:30px;">
			<table id="dataGrid"></table>
		</div>
	</div>
</body>
</html>
<script src="${theme_dir}/js/search.js"></script>